package com.viking.feign;

import com.viking.feign.fallback.StockFeignServiceFallbackImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * name: 指定调用rest接口所对应的服务名
 * path:指定调用rest接口所在的StockController指定的aRequestMapping,无可不写
 * configuration: 为服务指定自定义配置
 * fallback :熔断降级类
 */
@FeignClient(name = "stock-service",path = "/stock",fallback = StockFeignServiceFallbackImpl.class)
public interface StockFeignService {

    /**
     * 声明服务提供者stock对应rest借口
     */
    @RequestMapping("/reduce2")
    String reduce2();

}


